var net = require('net');

const UNIX_SOCKET = '/var/run/docker.sock'
var client = net.createConnection(UNIX_SOCKET);

client.on('connect', function() {
	console.log('connect');

	setInterval(function() {
		console.log('send data');
		client.write(
		'GET /containers/json HTTP/1.1'
		+'\r\n\r\n'
		);
	}, 3000);

});

client.on('data', function(data) {
	console.log('data', data.toString());
});

